package ex06.pyrmont.core;

import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;

/**
 * Created by carey on 2016/5/3 0003.
 */

/**
 * 因为在wrapper中没有针对Lifecycle时间做处理，所以这个监听器没有用
 */
public class WrapperLifecycleListener implements LifecycleListener {

    public void lifecycleEvent(LifecycleEvent event) {
        Lifecycle lifecycle = event.getLifecycle();
        System.out.println("WrapperLifecycleListener's event " +
                event.getType().toString());
        if (Lifecycle.START_EVENT.equals(event.getType())) {
            System.out.println("wrapper context.");
        }
        else if (Lifecycle.STOP_EVENT.equals(event.getType())) {
            System.out.println("wrapper context.");
        }

    }
}